<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAkbusIncomePostTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('akbus_income_post', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->date('date')->nullable()->comment('日期');
            $table->tinyInteger('line')->nullable()->comment('线路');
            $table->string('license_plate_num')->nullable()->comment('车辆车牌号');
            $table->string('self_numbering')->nullable()->comment('自编号');
            $table->decimal('ordinary_amt', 10, 2)->nullable()->comment('普通营收');
            $table->integer('ordinary_count')->nullable()->comment('普通运量');
            $table->decimal('student_amt', 10, 2)->nullable()->comment('学生营收');
            $table->integer('student_count')->nullable()->comment('学生运量');
            $table->decimal('welfare_amt', 10, 2)->nullable()->comment('公益营收');
            $table->integer('welfare_count')->nullable()->comment('公益运量');
            $table->decimal('total_amt', 10, 2)->nullable()->comment('营收小计');
            $table->integer('total_count')->nullable()->comment('运量小计');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('akbus_income_post');
    }
}
